package net.yla.smartbus.module.ba.right.roles.service;

import com.alibaba.fastjson.JSONObject;
import net.yla.smartbus.core.base.PageBean;
import net.yla.smartbus.core.constants.UserRoleEnum;
import net.yla.smartbus.module.ba.right.roles.dto.RolesDto;
import net.yla.smartbus.module.ba.right.roles.entity.RolesDO;
import net.yla.smartbus.module.ba.right.roles.form.RoleForm;
import net.yla.smartbus.module.ba.right.roles.form.RolesForm;
import net.yla.smartbus.module.ba.right.right.query.QueryOfActual;
import net.yla.smartbus.module.ba.right.roles.query.QueryOfCount;
import net.yla.smartbus.module.ba.right.roles.query.QueryOfRoles;
import net.yla.smartbus.module.ba.right.roles.query.QueryOfView;

import java.util.List;

/**
 * @Date: 2020-08-19 17:28
 * @Author: Being Nobody
 * @Version: 1.0
 */
public interface RolesService {


    int deleteByPrimaryKey(Integer roleId);

    int insert(RolesDO record);

    int insertSelective(RolesDO record);

    RolesDO selectByPrimaryKey(Integer roleId);

    int updateByPrimaryKeySelective(RolesDO record);

    int updateByPrimaryKey(RolesDO record);

    List<RolesDO> roles(Integer adminId);

    List<Integer> rolesAll(Integer adminId);

    int queryOfCount(QueryOfCount queryOfCount);

    PageBean<List<JSONObject>> queryOfRoles(QueryOfRoles queryOfRoles);

    JSONObject rolesOfView(QueryOfView queryOfView);

    int save(RolesForm rolesForm);

    int del(QueryOfView query);

    List<RolesDto> selectByAdmin(QueryOfRoles queryOfRoles);

    int add(RoleForm rolesForm);

    List<Integer> platformIds(RolesForm form);

    List<Integer> menuIds(RolesForm form);

    int update(RoleForm form);

    /**
     * 用户权限鉴定
     * @param userRoleEnum
     * @param token
     * @return
     */
    int userRoleEvaluation(UserRoleEnum userRoleEnum,String token,String ip);
}
